package com.shop.service.util;

import org.springframework.util.DigestUtils;

import java.nio.charset.StandardCharsets;

public class MD5Util {
    private static final String SALT = "woniuxy";
    public static String md5(String str) {
        str += SALT;
        return DigestUtils.md5DigestAsHex(str.getBytes(StandardCharsets.UTF_8));
    }
}
